import json

import bottle
from bottle import request, run

app = bottle.default_app()


@app.post("/push_gitee")
def view_dict():
    postValue = bottle.request.POST.decode('utf-8')
    dict_ll=postValue.dict
    for key in dict_ll:
        webhook_data=json.loads(key)
        print(webhook_data['password'])
        print(webhook_data['head_commit']['message'])
        break

if __name__ == '__main__':
    run(app=app, host='0.0.0.0', port='80', reloader=True)
